package youleche.com.business;

import java.sql.Connection;

import youleche.com.connection.ConnectionFactory;
import youleche.com.factory.DaoFactory;
import youleche.com.idao.IZzqy;
import youleche.com.model.MZzqy;

public class BZzqy {
	/**
	 * 数据库连接
	 */
	private Connection con = null;
	
	/**
	 * 处理器
	 */
	private IZzqy handler = null;
	
	/**
	 * 构造器
	 */
	public BZzqy(){
		this.handler = DaoFactory.getDZzqy();
	}
	
	/**
	 * 添加组织骑游信息
	 * @param zzqy 组织骑游
	 * @return 返回添加影响的行数
	 * @throws Exception 异常信息
	 */
	public int addZzqyInfo(MZzqy zzqy) throws Exception {
		try{
			this.con = ConnectionFactory.getUlecheWriteConnection();
			return this.handler.addZzqyInfo(this.con, zzqy);
		}finally{
			if(!this.con.isClosed()){
				this.con.close();
			}
		}
	}
}
